using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using PropertyExpression.ControllableQuery;

namespace LibraryCatalog
{
    internal static class RazorInit
    {
        public static void Register()
        {
            RazorConfigurationHelper.SetConfiguratio(new[] {typeof (RazorInit).Assembly}, QExecuter.ConnectionString,
                "CQCache");
        }
    }

    public class RazorConfiguration : IRazorConfiguration
    {
        public Tuple<IEnumerable<string>, IEnumerable<Assembly>> Get(MethodBase method, string file, int line,
            Tuple<IEnumerable<string>, IEnumerable<Assembly>> current)
        {
            return Tuple.Create(new[] {
                typeof(DB).Namespace
            }.Concat(current.Item1), current.Item2);
        }
    }
}